#ifndef __GRAPHICS_H__
#define __GRAPHICS_H__

typedef struct _FBImage
{
	SDL_Surface *surface;
	SDL_Rect rect;
} FBImage;

extern SDL_Surface *screen;

FBImage *get_image (const char *file);
int get_image_list (const char *template, int start, int end, FBImage **images);
void put_image (FBImage *img, int x, int y);

#if SDL_BYTEORDER == SDL_BIG_ENDIAN
  #define RMASK 0xFF000000
  #define GMASK 0x00FF0000
  #define BMASK 0x0000FF00
  #define AMASK 0x000000FF
#else
  #define RMASK 0x000000FF
  #define GMASK 0x0000FF00
  #define BMASK 0x00FF0000
  #define AMASK 0xFF000000
#endif

#define PRELOAD(img)							img;
#define PRELOAD_LIST(t,s,e)					get_image_list (t, s, e, NULL);

#define IMG_BACK_ONE_PLAYER					get_image ("back_one_player.png")
#define IMG_COMPRESSOR_EXT					get_image ("compressor_ext.png")
#define IMG_COMPRESSOR_MAIN					get_image ("compressor_main.png")
#define IMG_LOADING							get_image ("loading.png")
#define IMG_LOADING_STEP						get_image ("loading_step.png")
#define IMG_LOADING_STEP_INITIAL				get_image ("loading_step_initial.png")
#define IMG_SHOOTER							get_image ("shooter.png")

#define IMGTMPLT_BUBBLE						"balls/bubble-%d.gif"

#define IMG_1P_PANEL							get_image ("menu/1p_panel.png")
#define IMG_BACK_START						get_image ("menu/back_start.png")
#define IMG_FBLOGO							get_image ("menu/fblogo.png")
#define IMG_STAMP							get_image ("menu/stamp.png")
#define IMG_TXT_1PGAME_OFF					get_image ("menu/txt_1pgame_off.png")
#define IMG_TXT_1PGAME_OVER					get_image ("menu/txt_1pgame_over.png")
#define IMG_TXT_2PGAME_OFF					get_image ("menu/txt_2pgame_off.png")
#define IMG_TXT_2PGAME_OVER					get_image ("menu/txt_2pgame_over.png")
#define IMG_TXT_HIGHSCORES_OFF				get_image ("menu/txt_highscores_off.png")
#define IMG_TXT_HIGHSCORES_OVER				get_image ("menu/txt_highscores_over.png")
#define IMG_TXT_MENU_1P_OFF					get_image ("menu/txt_menu_1p_off.png")
#define IMG_TXT_MENU_1P_OVER					get_image ("menu/txt_menu_1p_over.png")
#define IMG_TXT_NETGAME_OFF					get_image ("menu/txt_netgame_off.png")
#define IMG_TXT_NETGAME_OVER					get_image ("menu/txt_netgame_over.png")
#define IMGTMPLT_ANIM_1PGAME					"menu/anims/1pgame_00%02d.png"
#define IMGTMPLT_ANIM_HIGHSCORE				"menu/anims/highscore_00%02d.png"
#define IMGTMPLT_ANIM_NETGAME				"menu/anims/netgame_00%02d.png"
#define IMGTMPLT_ANIM_P1P2					"menu/anims/p1p2_00%02d.png"
#define IMGTMPLT_BTNTXT_PLAYDEFAULT			"menu/txt_play_all_levels_text.png"
#define IMGTMPLT_BTNTXT_PICKLEVELS			"menu/txt_pick_start_level_text.png"
#define IMGTMPLT_BTNTXT_PLAYRANDOM			"menu/txt_play_random_levels_text.png"
#define IMGTMPLT_BTNTXT_MPTRAINING			"menu/txt_multiplayer_training_text.png"

#endif

